/*  1:   */ package org.jetbrains.rpc;
/*  2:   */ 
/*  3:   */

import com.intellij.openapi.util.ActionCallback;
import org.jetbrains.annotations.Nullable;

/*  4:   */
/*  5:   */
/*  6:   */ 
/*  7:   */ abstract class CommandCallbackWithResponseBase<SUCCESS_RESPONSE, C extends ActionCallback, RESULT, ERROR_DETAILS>
/*  8:   */   extends AsyncResultCallbackBase<SUCCESS_RESPONSE, C, ERROR_DETAILS>
/*  9:   */ {
/* 10:   */   private final String b;
/* 11:   */   
/* 12:   */   public CommandCallbackWithResponseBase(C paramC, String paramString, @Nullable ErrorConsumer<C, ERROR_DETAILS> paramErrorConsumer)
/* 13:   */   {
/* 14:11 */     super(paramC, paramErrorConsumer);
/* 15:   */     
/* 16:13 */     this.b = paramString;
/* 17:   */   }
/* 18:   */   
/* 19:   */   public final void onSuccess(SUCCESS_RESPONSE paramSUCCESS_RESPONSE, ResultReader<SUCCESS_RESPONSE> paramResultReader)
/* 20:   */   {
/* 21:   */     try
/* 22:   */     {
/* 23:20 */       onSuccess(paramResultReader.readResult(this.b, paramSUCCESS_RESPONSE));
/* 24:   */     }
/* 25:   */     catch (Throwable localThrowable)
/* 26:   */     {
/* 27:23 */       this.callback.reject(localThrowable.getMessage());
/* 28:24 */       MessageManager.LOG.error(localThrowable);
/* 29:   */     }
/* 30:   */   }
/* 31:   */   
/* 32:   */   protected abstract void onSuccess(RESULT paramRESULT);
/* 33:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.rpc.CommandCallbackWithResponseBase

 * JD-Core Version:    0.7.0.1

 */